/*
* ============================================================================
*  Name     : CKeyLockerAppUi from KeyLockerAppui.h
*  Part of  : KeyLocker
*  Created  : 28.12.2005 by DANG Zhengfa
*  Description:
*     Declares UI class for application.
*  Version  :
*  Copyright: Zhengfa Company Limited
* ============================================================================
*/

#ifndef KEYLOCKERAPPUI_H
#define KEYLOCKERAPPUI_H

// INCLUDES
#include <aknappui.h>

// FORWARD DECLARATIONS
class CKeyLockerContainer;
class CKeyLockerSettingContainer;
class CKeyLockerHelpContainer;


// CLASS DECLARATION

/**
* Application UI class.
* Provides support for the following features:
* - EIKON control architecture
* 
*/
class CKeyLockerAppUi : public CAknAppUi
    {
    public: // // Constructors and destructor

        /**
        * EPOC default constructor.
        */      
        void ConstructL();

        /**
        * Destructor.
        */      
        ~CKeyLockerAppUi();
        
    public: // New functions

    public: // Functions from base classes

    private:
		typedef enum _TViewType
		{
			EViewEntrance,
			EViewSetting,
			EViewHelp
		} TViewType;

		// From MEikMenuObserver
        void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);

    private:
        /**
        * From CEikAppUi, takes care of command handling.
        * @param aCommand command to be handled
        */
        void HandleCommandL(TInt aCommand);

        /**
        * From CEikAppUi, handles key events.
        * @param aKeyEvent Event to handled.
        * @param aType Type of the key event. 
        * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed). 
        */
        virtual TKeyResponse HandleKeyEventL(
            const TKeyEvent& aKeyEvent,TEventCode aType);

    private: //Data
        CKeyLockerContainer* iAppContainer;
		CKeyLockerSettingContainer* iSettingContainer;
		CKeyLockerHelpContainer* iHelpContainer;

		TViewType iViewType;

	private:
		void OnCmdSelectL(void);
		void SwitchViewsL( TViewType aType );

	};

#endif

// End of File
